/*
Authors: Eli Yucht 300388949 and Lior Fass 300069705
Project: Hamming
Description: Channel class
*/


#ifndef CHANNEL_H
#define CHANNEL_H

#include <cstring>
#include <cstdlib> // for atof(), rand()
#include <cmath> // for pow()

#include "socket_tools.h"


#define ARGS_NUM 4

// channel class declaration
class Channel
{
public:
	Channel();
	int Initialize_Channel(int argc, char * argv[]);
	int Run();
	~Channel();
private:
	SOCKET receiver_socket, sender_socket;
	SOCKET receiver_passive_socket, sender_passive_socket;
	double error_prob; unsigned int rand_seed;

	int Check_Arguments(int argc, char *argv[]);
	int Noise_Channel();
	int Get_Response_From_Receiver();

};

#endif // CHANNEL_H